import Jdrequest from "./request/index";
import Vue from "vue";
const instance = new Vue();
const Request = new Jdrequest({
  baseURL: "/api",
  interceptor: {
    requestInterceptor: (config) => {
      //   console.log("请求拦截器生效");
      return config;
    },
    responseInterceptor: (res) => {
      return res.data;
    },
    responseInterceptorCatch: (err) => {
      instance.$message({
        message: "网络异常，请检查连接！",
        type: "error",
      });
    },
  },
});
export default Request;
